# 位运算符主要有 &   |   ^  <<    >>

# a = 60    二进制  00111100

# b = 13    二进制  00001101

a = 60  # 00111100
b = 13  # 00001101
print(a & b)   # 12   # 00001100 ====> 1* 2^3 + 1*2^2 = 12
print(a | b)   # 61   # 00111101 ====> 1*2^5+1*2^4+1*2^3+1*2^2+1=32+16+8+4+1=61
print(a ^ b)   # 49   # 00110001 ===>1 * 2^5+1*2^4+1 = 32+16+1 = 49
print(a << 2)  # 240  # 00111100 ===>11110000===>1*2^7+1*2^6+1*2^5+1*2^4 = 128+64+32+16 = 240
